/**
 * 
 */
package com.bolbachchan.blog.hibernate.domain;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author Chaitanya
 * 
 */
public class Comments implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -8470962274994457780L;

    private Integer objId = null;
    private UserDetails userDetails;
    private Posts posts;
    private String commentContent;
    private Timestamp createDt;
    private Timestamp updateDt;

    /**
     * @return the objId
     */
    public Integer getObjId() {
	return objId;
    }

    /**
     * @param objId
     *            the objId to set
     */
    public void setObjId(Integer objId) {
	this.objId = objId;
    }

    /**
     * @return the userDetails
     */
    public UserDetails getUserDetails() {
	return userDetails;
    }

    /**
     * @param userDetails
     *            the userDetails to set
     */
    public void setUserDetails(UserDetails userDetails) {
	this.userDetails = userDetails;
    }

    /**
     * @return the posts
     */
    public Posts getPosts() {
	return posts;
    }

    /**
     * @param posts
     *            the posts to set
     */
    public void setPosts(Posts posts) {
	this.posts = posts;
    }

    /**
     * @return the commentContent
     */
    public String getCommentContent() {
	return commentContent;
    }

    /**
     * @param commentContent
     *            the commentContent to set
     */
    public void setCommentContent(String commentContent) {
	this.commentContent = commentContent;
    }

    /**
     * @return the createDt
     */
    public Timestamp getCreateDt() {
	return createDt;
    }

    /**
     * @param createDt
     *            the createDt to set
     */
    public void setCreateDt(Timestamp createDt) {
	this.createDt = createDt;
    }

    /**
     * @return the updateDt
     */
    public Timestamp getUpdateDt() {
	return updateDt;
    }

    /**
     * @param updateDt
     *            the updateDt to set
     */
    public void setUpdateDt(Timestamp updateDt) {
	this.updateDt = updateDt;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((commentContent == null) ? 0 : commentContent.hashCode());
	result = prime * result + ((createDt == null) ? 0 : createDt.hashCode());
	result = prime * result + ((objId == null) ? 0 : objId.hashCode());
	result = prime * result + ((updateDt == null) ? 0 : updateDt.hashCode());
	return result;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj)
	    return true;
	if (obj == null)
	    return false;
	if (getClass() != obj.getClass())
	    return false;
	Comments other = (Comments) obj;
	if (commentContent == null) {
	    if (other.commentContent != null)
		return false;
	}
	else if (!commentContent.equals(other.commentContent))
	    return false;
	if (createDt == null) {
	    if (other.createDt != null)
		return false;
	}
	else if (!createDt.equals(other.createDt))
	    return false;
	if (objId == null) {
	    if (other.objId != null)
		return false;
	}
	else if (!objId.equals(other.objId))
	    return false;
	if (updateDt == null) {
	    if (other.updateDt != null)
		return false;
	}
	else if (!updateDt.equals(other.updateDt))
	    return false;
	return true;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("Comments [objId=");
	builder.append(objId);
	builder.append(", userDetails=");
	builder.append(userDetails);
	builder.append(", posts=");
	builder.append(posts);
	builder.append(", commentContent=");
	builder.append(commentContent);
	builder.append(", createDt=");
	builder.append(createDt);
	builder.append(", updateDt=");
	builder.append(updateDt);
	builder.append("]");
	return builder.toString();
    }

}
